home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Enigma Amiga CD / Listati / 63-Marzo-Listato2.c < prev    next >
C/C++ Source or Header  |  1992-09-02  |  543b  |  18 lines

  1. /*******************************************************************************
  2. * Listato 2 - Funzione WaitEvent che gestisce l'attesa di un evento            *
  3. *******************************************************************************/
  4.  
  5. #include <exec/types.h>
  6. #include <intuition/intuition.h>
  7.  
  8. void WaitEvent(struct MsgPort *porta,struct IntuiMessage *mess)
  9. {
  10.   struct IntuiMessage *msg;
  11.  
  12.   while ((msg = (struct IntuiMessage *)GetMsg(porta)) == NULL)
  13.     WaitPort(porta);
  14.  
  15.   CopyMem(msg,mess,sizeof(struct IntuiMessage));
  16.   return;
  17. }
  18.